<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="referrer" content="no-referrer" />
    <meta
      name="viewport"
      content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"
    />
    <link
      rel="stylesheet"
      href="https:////at.alicdn.com/t/c/font_4755959_1mxov0bn18l.css"
    />
    <link rel="icon" type="image/x-icon" href=".../img/logo.jpg" />
    <link rel="stylesheet" href="../style/public.css" />
    <link rel="stylesheet" href="./account-set.css" />
    <title>账户设置</title>
  </head>
  <body>
    <header>
      <div class="nav flex aic bg-base p-25">
        <p class="f14 fff back">
          <i class="iconfont icon-arrow-left"></i><span>返回</span>
        </p>
        <p class="fff f18 flex jc-c title"><span>账户设置</span></p>
      </div>
    </header>
    <main>
      <div class="flex aic jc-sb p-15 pt-20 pb-20 bb2 bg-fff">
        <p class="f16"><span>用户名</span></p>
        <p id="username1" class="c666 flex aic f14 " style="display: none;">
          <span>陈xx</span><i class="iconfont icon-youjiantou"></i>
        </p>
        <a href="../login/login.html" id="username2" class="c666 flex aic f14">
          <span>请登录</span><i class="iconfont icon-youjiantou"></i>
        </a>
      </div>
      <div class="flex aic jc-sb p-15 pt-20 pb-20 bb2 bg-fff">
        <p  class="f16"><span>电话号码</span></p>
        <p id="phone1" class="c666 flex aic f14"  style="display: none;">
          <span>13800000000</span><i class="iconfont icon-youjiantou"></i>
        </p>
        <a href="../login/login.html" id="phone2" class="c666 flex aic f14">
          <span>请登录</span><i class="iconfont icon-youjiantou"></i>
        </a>
      </div>
      <div class="flex aic jc-sb p-15 pt-20 pb-20 bb2 bg-fff">
        <p class="f16"><span>微信号</span></p>
        <p id="wx1" class="c666 flex aic f14" style="display: none;">
          <span>vx-138...</span><i class="iconfont icon-youjiantou"></i>
        </p>
        <a href="../login/login.html" id="wx2" class="c666 flex aic f14" >
          <span>请登录</span><i class="iconfont icon-youjiantou"></i>
        </a>
      </div>
      <div class="flex aic jc-sb p-15 pt-20 pb-20 bb2 bg-fff">
        <p class="f16"><span>修改密码</span></p>
        <p class="c666 flex aic f14">
          <i class="iconfont icon-youjiantou"></i>
        </p>
      </div>
      <div class="flex aic jc-sb p-15 pt-20 pb-20 bg-fff">
        <p class="f16"><span>简历状态</span></p>
        <p class="c666 flex aic f14">
         <i class="iconfont icon-youjiantou"></i>
        </p>
      </div>
      <div class="flex aic jc-sb p-15 pt-20 pb-20 bg-fff mt-10">
        <p class="f16"><span>微信绑定</span></p>
        <p id="vx1" class="c666 flex aic f14" style="display: none;">
          <span class="base">已绑定</span><i class="iconfont icon-youjiantou"></i>
        </p>
        <p id="vx2" class="c666 flex aic f14">
          <span  style="color: red;">未绑定</span><i class="iconfont icon-youjiantou"></i>
        </p>
      </div>
    </main>
    <footer>
      <div class="foot p-15 bg-fff fixed w100p fcc">
        <button id="logout" class="fff bg-base btn">
          <span>退出登录</span>
        </button>
      </div>
    </footer>
    <script src="../js/jquery.js"></script>
    <script src="../js/axios.js"></script>
    <script src="../js/common.js"></script>
    <script>
      // 点击返回按钮，跳转到 my.html
      $(".back").click(function () {
        history.back();
      });

      // 点击关闭按钮，切换文本内容
      $("#close").click(function () {
        if ($(this).text() == "关闭") {
          $(this).text("开启");
        } else {
          $(this).text("关闭");
        }
      });
      setObj = {
       
        deleteData() {
          $("#logout").click(function () {
        // 清除本地存储
        localStorage.clear();
        location.href = "../my/my.html";
      });
        },
        render() {
    var phone =localStorage.phone;
    var userName = localStorage.userName;
    if (phone) {
      $('#username1').show().html(`
      <span>${userName}</span><i class="iconfont icon-youjiantou"></i>
      `);
        $('#username2').hide();
        $('#phone1').show().html(`
         <span>${phone}</span><i class="iconfont icon-youjiantou"></i>
        
        `);;
        $('#phone2').hide();
        $('#wx1').show();
        $('#wx2').hide();
        $('#vx1').show();
        $('#vx2').hide();
    }else {
      $('#username1').hide();
      $('#username2').show();
      $('#phone1').hide();
      $('#phone2').show();
      $('#wx1').hide();
      $('#wx2').show();
      $('#vx1').hide();
      $('#vx2').show();
    }
   }
      };

      // 点击退出登录按钮的处理函数
      setObj.deleteData();
      setObj.render();
    </script>
  </body>
</html>
